package com.mextends;

public class ExtendsDemo1 {
    public static void main(String[] args) {
        Coder c=new Coder();
        c.setName("zhans");
        System.out.println(c.getName());
        c.zuaYang();

    }
}

class Employee{
    private String name;
    private int age;
    private double salary;

    public void zuaYang(){
        System.out.println("弓箭");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}

class Coder extends Employee{
    // 方法重写
    @Override
    public void zuaYang() {
        super.zuaYang();
        System.out.println("加枪");
    }
}

class Manager extends Employee{

}
